import { http } from '@/utils/http'

export function usePmDictApi() {
  return {
    // 查询全部字典数据列表
    listSimpleDictData() {
      return http.get<PmDict[]>('/prod-api/admin-api/system/dict-data/list-all-simple', {
        status: 0,
      })
    },
    // 根据字典类型查询字典数据信息
    getDictByType(dictType: string) {
      return http.get<PmDict>(`/system/dict-data/type/${dictType}`)
    },
    getDictByCode(dictCode: string) {
      return http.get<PmDict>(`/system/dict-data/get?id=${dictCode}`)
    }
  }
}
